#!/usr/bin/env python
""" AnyBackup is a windows specific backup program to keep multiple volumes in sync with multiple volumes
    Copyright (C) 2011  Andrew Hopkinson

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    Exported Classes:
    
    mySplash -- a simple splash screen wrapper
    """
    
import wx

class mySplash:
    """ a simple splash screen wrapper """
    def __init__(self):
        wx.InitAllImageHandlers()
        self.logo = wx.Bitmap("icons/logo.png",wx.BITMAP_TYPE_PNG)
        
    def show(self):
        self.splash = wx.SplashScreen(self.logo,wx.SPLASH_CENTRE_ON_SCREEN,50000,None,-1,wx.DefaultPosition,wx.DefaultSize)
        self.splash.CreateStatusBar()
        
    def setStatusText(self,string):
        self.splash.SetStatusText(string + '...')
        wx.Yield()
        
    def close(self):
        self.splash.Close(1)